package org.sabayframework.queue.impl;

import org.sabayframework.activity.Activity;
import org.sabayframework.activity.ActivityMonitor;
import org.sabayframework.channel.Channel;
import org.sabayframework.queue.ExecutionQueue;

public class DelegatingExecutionQueue implements ExecutionQueue {

	private final ExecutionQueue delegate;

	public DelegatingExecutionQueue(ExecutionQueue delegate) {
		super();
		this.delegate = delegate;
	}
	
	public ExecutionQueue getDelegate() {
		return delegate;
	}

	@Override
	public <I, O> ActivityMonitor<I, O> submit(Activity<I, O> activity,
			Channel<I> input, Channel<O> output) {
		return delegate.submit(activity, input, output);
	}
	
	@Override
	public <I, O> ActivityMonitor<I, O> execute(Activity<I, O> activity,
			Channel<I> input, Channel<O> output) {
		return delegate.execute(activity, input, output);
	}
	
	@Override
	public int workerCount() {
		return delegate.workerCount();
	}
	
	@Override
	public int size() {
		return delegate.size();
	}
	
	@Override
	public boolean isEmpty() {
		return delegate.isEmpty();
	}
	
	@Override
	public void channelChanged(Channel<?> input) {
		delegate.channelChanged(input);
	}
	
	@Override
	public void stop() {
		delegate.stop();
	}
	
}
